<td>
    <div style="margin:0; padding:0; width:100%; height:100%; border: solid #c9c8c9 1px; vertical-align: middle;">
        <table cellpadding="0" cellspacing="0" width="100%" border="0">
            <tr>
                <td height="100%" style="margin:0; padding:0;">
                    <?php
                    $image_file_small = 'upload/portfolios/img_'.$portfolio['id'].'_small.jpg';
                    $image_file = 'upload/portfolios/img_'.$portfolio['id'].'.jpg';
                    if (file_exists($image_file)) {  ?>
                        <a style="vertical-align:middle;" class="gallery" rel="group" href="<?php print $image_file.'?v='.$portfolio['version']; ?>" title="<?php print htmlspecialchars($portfolio["title"]); ?>">
                            <img src="<?php print $image_file_small.'?v='.$portfolio['version']; ?>" alt="<?php print htmlspecialchars($portfolio["title"]); ?>" class="portfolio">
                        </a>
                    <?php   } else {    ?>
                        <img src="img/no_news_img.jpg" alt="Фото для новости не задано"  class="occurrence">
                    <?php   }?>


                </td>
            </tr>
        </table>
    </div>
</td>
